home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / comm / ecu_patc < prev    next >
Encoding:
Text File  |  1993-08-03  |  26.5 KB  |  1,029 lines

  1. Index: Make.src
  2. *** dist/ecu/Make.src    Sun Jul 11 22:02:50 1993
  3. --- ecu3.24/Make.src    Mon Jul 12 14:51:27 1993
  4. ***************
  5. *** 387,409 ****
  6.           cd ecuungetty; $(MAKE) -$(MAKEFLAGS) clobber; \
  7.       fi
  8.   
  9.   #regenerate .o:.h dependencies automatically
  10.   depend:
  11. !     rm -f depend.tmp
  12. !     if test '$(SRC)' ;\
  13. !     then (grep '^#include' $(SRC) \
  14. !     | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  15. !         -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  16. !         -e 's?\(.*\)\.c?\1.o?'\
  17. !      >> depend.tmp) ;\
  18. !     fi
  19.   
  20.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  21.       echo '.+1,$$d' >>eddep.tmp
  22.       echo 'r depend.tmp' >> eddep.tmp
  23.       echo 'w' >> eddep.tmp
  24.       cp Makefile Makefile.new
  25. !     ed Makefile.new < eddep.tmp
  26.       rm eddep.tmp depend.tmp
  27.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  28.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  29. --- 387,414 ----
  30.           cd ecuungetty; $(MAKE) -$(MAKEFLAGS) clobber; \
  31.       fi
  32.   
  33. + distclean: clobber
  34. +     cd help; $(MAKE) -$(MAKEFLAGS) distclean
  35. +     cd z; $(MAKE) -$(MAKEFLAGS) distclean
  36. +     cd sea; $(MAKE) -$(MAKEFLAGS) distclean
  37. +     if [ $(USE_ECUUNGETTY) = yes ]; then \
  38. +         cd ecuungetty; $(MAKE) -$(MAKEFLAGS) distclean; \
  39. +     fi
  40. +     cd ecufriend; $(MAKE) -$(MAKEFLAGS) distclean
  41. +     cd gendial; $(MAKE) -$(MAKEFLAGS) distclean
  42. +     rm -f Makefile
  43.   #regenerate .o:.h dependencies automatically
  44.   depend:
  45. !     $(CC) -M $(CFLAGS) $(SRC) >>depend.tmp
  46.   
  47.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  48.       echo '.+1,$$d' >>eddep.tmp
  49.       echo 'r depend.tmp' >> eddep.tmp
  50.       echo 'w' >> eddep.tmp
  51. +     echo 'q' >> eddep.tmp
  52.       cp Makefile Makefile.new
  53. !     ex Makefile.new < eddep.tmp || true
  54.       rm eddep.tmp depend.tmp
  55.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  56.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  57. Index: README.Linux
  58. *** /dev/null    Sat Aug 29 16:48:28 1992
  59. --- ecu3.24/README.Linux    Mon Jul 12 14:55:28 1993
  60. ***************
  61. *** 0 ****
  62. --- 1,22 ----
  63. + This is ecu 3.24 modified to work with Linux.
  64. + There are several files in this distribution.
  65. + ecu3.24src.tgz    - Source of ecu
  66. + ecu3.24bin.tgz    - Binaries of ecu compiled using gcc 2.4.3 shared libs 4.4.1
  67. + ecu.patch    - patch to original sources to make it work correctly under
  68. +           Linux.
  69. + I made the folowing changes to get it to work:
  70. + send init string esc [1;24r to set up console
  71. + when quiting send the termcap ll sequence, which in my termcap includes esc
  72. +     [1;25r if yours does not, you will need to add it.
  73. + made some changes to get DEL to work like BS internally
  74. + changed the dial script timeout to 45 seconds (what modem could connect in 10
  75. +     secs??)
  76. + changed the internal idea of screen size so it only uses 24 lines.
  77. + changed the wildcard globbing to use sh instead of csh
  78. + got make depend to work.  Used gcc builtin (-M flag) rather than their sed
  79. +     script.  Also had to use ex rather than ed, since ed doesn't recognise
  80. +     the ^ as the beginning of the line. (At least on my system, which is
  81. +     probably like most other peoples)
  82. +     
  83. Index: config.c
  84. *** dist/ecu/config.c    Sun Jul 11 17:21:41 1993
  85. --- ecu3.24/config.c    Mon Jul 12 15:34:44 1993
  86. ***************
  87. *** 83,88 ****
  88. --- 83,89 ----
  89.   #define S_SUN        2
  90.   #define S_ISCSVR4    3
  91.   #define S_ESIXSVR4    4
  92. + #define S_LINUX    5
  93.   
  94.   #define X_X286        0
  95.   #define X_X386        1
  96. ***************
  97. *** 200,207 ****
  98. --- 201,212 ----
  99.   #ifdef PEDANTIC
  100.       "\t-pedantic -ansi -O \\\n",        /* UH OH: see ecu README */
  101.   #else
  102. + #ifdef linux
  103. +     "\t-O2  \\\n",
  104. + #else
  105.       "\t-traditional -O \\\n",
  106.   #endif
  107. + #endif
  108.   #if defined(WHT) || defined(FORCE_DASH_G)
  109.       "\t-g \\\n",
  110.   #endif
  111. ***************
  112. *** 261,266 ****
  113. --- 266,276 ----
  114.   char *svr4_gcc_opts = "\t-DSVR4 -DSYSV \\\n";
  115.   char *svr4_sigtype = "void";
  116.   
  117. + char *linux_cc_opts    = "\t-m486 -DSYSV -Di386 -DNO_RDCHK \\\n";
  118. + char *linux_gcc_opts    = "\t-m486 -DSYSV -Di386 -DNO_RDCHK \\\n";
  119. + char *linux_sigtype    = "void";
  120.   /*
  121.    * LIBS
  122.    */
  123. ***************
  124. *** 284,289 ****
  125. --- 294,301 ----
  126.   
  127.   char *svr4_libs = "-lcurses -lx -lmalloc";
  128.   
  129. + char *linux_libs    = "-lcurses -ltermcap";
  130.   char *sco_system[] = {
  131.       "XENIX/286",
  132.       "XENIX/386",
  133. ***************
  134. *** 445,450 ****
  135. --- 457,468 ----
  136.               fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
  137.               fputs("\t-DLOCK_DIR_NAME='\"/var/spool/locks\"' \\\n",fpmake);
  138.               break;
  139. +         case S_LINUX:
  140. +             fputs(linux_cc_opts,fpmake);
  141. +             fputs("\t-DWORKING_SELECT \\\n",fpmake);
  142. +             fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
  143. +             fputs("\t-DLOCK_DIR_NAME='\"/usr/spool/uucp\"' \\\n",fpmake);
  144. +             break;
  145.       }
  146.       fprintf(fpmake,"\t-DDEFAULT_TTY='\"/dev/%s\"' \\\n",tty);
  147.       fprintf(fpmake,"\t-DDEFAULT_BAUD_RATE=%s \\\n",baud);
  148. ***************
  149. *** 507,512 ****
  150. --- 525,536 ----
  151.               fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
  152.               fputs("\t-DLOCK_DIR_NAME='\"/var/spool/locks\"' \\\n",fpmake);
  153.               break;
  154. +         case S_LINUX:
  155. +             fputs(linux_cc_opts,fpmake);
  156. +             fputs("\t-DWORKING_SELECT \\\n",fpmake);
  157. +             fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
  158. +             fputs("\t-DLOCK_DIR_NAME='\"/usr/spool/uucp\"' \\\n",fpmake);
  159. +             break;
  160.       }
  161.       if(have_gcc_140)
  162.           fputs("\t-DGCC140 \\\n",fpmake);
  163. ***************
  164. *** 571,576 ****
  165. --- 595,609 ----
  166.   }
  167.   
  168.   void
  169. + gen_linux_ldflags()
  170. + {
  171. +     fputs("LDFLAGS = \\\n",fpmake);
  172. +     fputs("\t-s $(SYMBOLIC) $(LDFLAGS_EXTRA)\n\n",fpmake);
  173. +     fprintf(fpmake,"LIBS = %s\n\n",linux_libs);
  174. + }
  175. + void
  176.   generate_config(mdir)
  177.   char *mdir;
  178.   {
  179. ***************
  180. *** 646,651 ****
  181. --- 679,687 ----
  182.           case S_ESIXSVR4:
  183.               fprintf(fpmake,"SIGTYPE = %s\n\n",svr4_sigtype);
  184.               break;
  185. +         case S_LINUX:
  186. +             fprintf(fpmake,"SIGTYPE = %s\n\n",linux_sigtype);
  187. +             break;
  188.       }
  189.   
  190.       switch(compiler)
  191. ***************
  192. *** 675,680 ****
  193. --- 711,719 ----
  194.           case S_ESIXSVR4:
  195.               gen_svr4_ldflags();
  196.               break;
  197. +         case S_LINUX:
  198. +             gen_linux_ldflags();
  199. +             break;
  200.       }
  201.   
  202.       fprintf(fpmake,"LBIN = %s\n",bindir);
  203. ***************
  204. *** 709,714 ****
  205. --- 748,758 ----
  206.               fputs("HDBLIBDIR = /etc/uucp\n",fpmake);
  207.               use_ecuungetty = "no";
  208.               break;
  209. +         case S_LINUX:
  210. +             fputs("SYSTEM = Linux\n",fpmake);
  211. +             fputs("HDBLIBDIR = /usr/lib/uucp\n",fpmake);
  212. +             use_ecuungetty = "no";
  213. +             break;
  214.       }
  215.   
  216.   
  217. ***************
  218. *** 751,757 ****
  219.       setbuf(stdin,NULL);
  220.       setbuf(stdout,NULL);
  221.   
  222. !     while((itmp = getopt(argc,argv,"dsiS234ugcT:B:P:b:l:")) != -1)
  223.       {
  224.           switch(itmp)
  225.           {
  226. --- 795,801 ----
  227.       setbuf(stdin,NULL);
  228.       setbuf(stdout,NULL);
  229.   
  230. !     while((itmp = getopt(argc,argv,"dsiSL234ugcT:B:P:b:l:")) != -1)
  231.       {
  232.           switch(itmp)
  233.           {
  234. ***************
  235. *** 762,767 ****
  236. --- 806,812 ----
  237.               case 'S': sys = S_SUN; break;
  238.               case 'I': sys = S_ISCSVR4; break;
  239.               case 'E': sys = S_ESIXSVR4; break;
  240. +             case 'L': sys = S_LINUX; break;
  241.   
  242.               case '2': sco_type = X_X286; break;
  243.               case '3': sco_type = X_X386; break;
  244. ***************
  245. *** 837,842 ****
  246. --- 882,891 ----
  247.   #ifdef sun
  248.       itmp = 'S';
  249.   #endif
  250. + #ifdef linux
  251. +     itmp = 'L';
  252. +     compiler = C_GCC;
  253. + #endif
  254.   
  255.       if(sys < 0)
  256.       {
  257. ***************
  258. *** 847,854 ****
  259.                   S  SunOS 4.1,\n\
  260.                   I  ISC SVR4 or\n\
  261.                   E  ESIX SVR4 system\n\
  262.   ",
  263. !             "siSIE",itmp))
  264.           {
  265.               case 's':  
  266.                   sys = S_SCO; 
  267. --- 896,904 ----
  268.                   S  SunOS 4.1,\n\
  269.                   I  ISC SVR4 or\n\
  270.                   E  ESIX SVR4 system\n\
  271. +                 L  Linux 0.99p10\n\
  272.   ",
  273. !             "siSIEL",itmp))
  274.           {
  275.               case 's':  
  276.                   sys = S_SCO; 
  277. ***************
  278. *** 872,877 ****
  279. --- 922,931 ----
  280.                   sys = S_ESIXSVR4; 
  281.                   tty = "tty00";
  282.                   break;
  283. +             case 'L':
  284. +                 sys = S_LINUX;
  285. +                 tty = "cua0";
  286. +                 break;
  287.           }
  288.       }
  289.   
  290. ***************
  291. *** 1004,1009 ****
  292. --- 1058,1064 ----
  293.                           case S_SUN:
  294.                           case S_ISCSVR4:
  295.                           case S_ESIXSVR4:
  296. +                         case S_LINUX:
  297.                               can_pipe = 1; /* native as reads from stdin ok */
  298.                               break;
  299.                           default:
  300. Index: ecucurses.h
  301. *** dist/ecu/ecucurses.h    Sun Jul 11 17:22:25 1993
  302. --- ecu3.24/ecucurses.h    Wed Jul  7 16:11:17 1993
  303. ***************
  304. *** 38,44 ****
  305.   # include <tinfo.h>
  306.   #endif /* M_TERMCAP */
  307.   #else /* !M_SYSV */
  308. ! #if defined(sun)
  309.   # include <curses.h>
  310.   #else
  311.   /*
  312. --- 38,44 ----
  313.   # include <tinfo.h>
  314.   #endif /* M_TERMCAP */
  315.   #else /* !M_SYSV */
  316. ! #if defined(sun) || defined(linux)
  317.   # include <curses.h>
  318.   #else
  319.   /*
  320. Index: ecufork.c
  321. *** dist/ecu/ecufork.c    Sun Jul 11 17:22:47 1993
  322. --- ecu3.24/ecufork.c    Mon Jul 12 15:17:15 1993
  323. ***************
  324. *** 424,430 ****
  325. --- 424,435 ----
  326.           close(stderr_pipe[P_WRITE]);
  327.           close(null);
  328.           child_signals();
  329. + #ifdef linux
  330. +         /* Most Linux systems don't have a csh */
  331. +         execl("/bin/sh","sh","-c",echo_cmd,(char *)0);
  332. + #else
  333.           execl("/bin/csh","csh","-e","-f","-c",echo_cmd,(char *)0);
  334. + #endif
  335.           _exit(255);
  336.       }
  337.   
  338. Index: ecufriend/Make.src
  339. *** dist/ecu/ecufriend/Make.src    Sun Jul 11 17:21:03 1993
  340. --- ecu3.24/ecufriend/Make.src    Mon Jul 12 13:49:16 1993
  341. ***************
  342. *** 33,35 ****
  343. --- 33,37 ----
  344.   clobber: clean
  345.       rm -f $(PROGRAM)
  346.   
  347. + distclean: clobber
  348. +     rm -f Makefile
  349. Index: ecugrabbag.c
  350. *** dist/ecu/ecugrabbag.c    Sun Jul 11 17:22:55 1993
  351. --- ecu3.24/ecugrabbag.c    Mon Jul  5 17:50:03 1993
  352. ***************
  353. *** 595,603 ****
  354. --- 595,607 ----
  355.   #endif
  356.           case SIGFPE:    cptr = "SIGFPE"; break;
  357.           case SIGKILL:    cptr = "SIGKILL"; break;
  358. + #ifdef SIGBUS        
  359.           case SIGBUS:    cptr = "SIGBUS"; break;
  360. + #endif
  361.           case SIGSEGV:    cptr = "SIGSEGV"; break;
  362. + #ifdef SIGSYS
  363.           case SIGSYS:    cptr = "SIGSYS"; break;
  364. + #endif
  365.           case SIGPIPE:    cptr = "SIGPIPE"; break;
  366.           case SIGALRM:    cptr = "SIGALRM"; break;
  367.           case SIGTERM:    cptr = "SIGTERM"; break;
  368. Index: ecuicmhelp.c
  369. *** dist/ecu/ecuicmhelp.c    Sun Jul 11 17:23:11 1993
  370. --- ecu3.24/ecuicmhelp.c    Sat Jul 10 18:11:15 1993
  371. ***************
  372. *** 33,38 ****
  373. --- 33,40 ----
  374.   #include "ecuxkey.h"
  375.   #include "pc_scr.h"
  376.   
  377. + extern int tcap_LINES;
  378.   #define PDAT    "ecuhelp.data"
  379.   
  380.   void help_right_column();
  381. ***************
  382. *** 146,152 ****
  383.   int x;
  384.   
  385.       touchwin(stdscr);
  386. !     wmove(stdscr,LINES - 1,0);
  387.       wstandout(stdscr);
  388.       waddstr(stdscr,prompt);
  389.       getyx(stdscr,y,x);
  390. --- 148,154 ----
  391.   int x;
  392.   
  393.       touchwin(stdscr);
  394. !     wmove(stdscr,tcap_LINES - 1,0);
  395.       wstandout(stdscr);
  396.       waddstr(stdscr,prompt);
  397.       getyx(stdscr,y,x);
  398. ***************
  399. *** 311,324 ****
  400.   #endif
  401.           }
  402.           y++;
  403. !         if(y >= LINES - 3)
  404.           {
  405.               y = 2;
  406.               x = right_column;
  407.           }
  408.           pcmd++;
  409.       }
  410. !     wmove(stdscr,LINES - 2,0);
  411.       wstandout(stdscr);
  412.       waddstr(stdscr,
  413.   "Capitalized portion of listed command sufficient for command recognition");
  414. --- 313,326 ----
  415.   #endif
  416.           }
  417.           y++;
  418. !         if(y >= tcap_LINES - 3)
  419.           {
  420.               y = 2;
  421.               x = right_column;
  422.           }
  423.           pcmd++;
  424.       }
  425. !     wmove(stdscr,tcap_LINES - 2,0);
  426.       wstandout(stdscr);
  427.       waddstr(stdscr,
  428.   "Capitalized portion of listed command sufficient for command recognition");
  429. ***************
  430. *** 354,360 ****
  431.           {
  432.               if(!*cptr)
  433.                   goto DISPLAY_MENU;
  434. !             wmove(stdscr,LINES - 1,0);
  435.               wclrtoeol(stdscr);
  436.               wrefresh(stdscr);
  437.               help_display_on_stderr(cptr);
  438. --- 356,362 ----
  439.           {
  440.               if(!*cptr)
  441.                   goto DISPLAY_MENU;
  442. !             wmove(stdscr,tcap_LINES - 1,0);
  443.               wclrtoeol(stdscr);
  444.               wrefresh(stdscr);
  445.               help_display_on_stderr(cptr);
  446. Index: eculine.c
  447. *** dist/ecu/eculine.c    Sun Jul 11 17:23:25 1993
  448. --- ecu3.24/eculine.c    Mon Jul 12 15:40:57 1993
  449. ***************
  450. *** 384,390 ****
  451.               tval.tv_sec = lrwt->to1 / 1000L;
  452.               tval.tv_usec = (lrwt->to1 % 1000L) * 1000L;
  453.           }
  454. !         if(select(shm->Liofd + 1,&fdmask,(int *)0,(int *)0,&tval) != 1)
  455.           {
  456.               if(errno == EINTR)
  457.                   continue;
  458. --- 384,390 ----
  459.               tval.tv_sec = lrwt->to1 / 1000L;
  460.               tval.tv_usec = (lrwt->to1 % 1000L) * 1000L;
  461.           }
  462. !         if(select(shm->Liofd + 1,&fdmask,NULL,NULL,&tval) != 1)
  463.           {
  464.               if(errno == EINTR)
  465.                   continue;
  466. ***************
  467. *** 489,495 ****
  468.       tval.tv_sec = msec / 1000L;
  469.       tval.tv_usec = (msec % 1000L) * 1000L;
  470.       fdmask = 1 << shm->Liofd; /* Liofd will always be <= 31, right? */
  471. !     if(select(shm->Liofd + 1,&fdmask,(int *)0,(int *)0,&tval) < 1)
  472.           return(-1);
  473.       if(!lrdchk_xmtr())
  474.           return(-1);
  475. --- 489,495 ----
  476.       tval.tv_sec = msec / 1000L;
  477.       tval.tv_usec = (msec % 1000L) * 1000L;
  478.       fdmask = 1 << shm->Liofd; /* Liofd will always be <= 31, right? */
  479. !     if(select(shm->Liofd + 1,&fdmask,NULL,NULL,&tval) < 1)
  480.           return(-1);
  481.       if(!lrdchk_xmtr())
  482.           return(-1);
  483. Index: ecuphdir.c
  484. *** dist/ecu/ecuphdir.c    Sun Jul 11 17:23:52 1993
  485. --- ecu3.24/ecuphdir.c    Sat Jul 10 18:12:40 1993
  486. ***************
  487. *** 105,110 ****
  488. --- 105,112 ----
  489.   #include "esd.h"
  490.   #include "var.h"
  491.   
  492. + extern int tcap_LINES;
  493.   char *find_procedure();
  494.   char *make_char_graphic();
  495.   char *linst_err_text();
  496. ***************
  497. *** 115,121 ****
  498.   void dirw_cmd_line_setup();
  499.   
  500.   /* window definitions */
  501. ! #define DIRW_LINES        (LINES - 1)
  502.   #define DIRW_COLS        (80)
  503.   #define DIRW_TOP_LINES    2
  504.   #define DIRW_BOT_LINES    4
  505. --- 117,123 ----
  506.   void dirw_cmd_line_setup();
  507.   
  508.   /* window definitions */
  509. ! #define DIRW_LINES        (tcap_LINES - 1)
  510.   #define DIRW_COLS        (80)
  511.   #define DIRW_TOP_LINES    2
  512.   #define DIRW_BOT_LINES    4
  513. Index: ecurcvr.c
  514. *** dist/ecu/ecurcvr.c    Sun Jul 11 17:24:06 1993
  515. --- ecu3.24/ecurcvr.c    Sun Jul 11 23:09:24 1993
  516. ***************
  517. *** 1344,1349 ****
  518. --- 1344,1350 ----
  519.                   break;
  520.   
  521.               case BS:
  522. +             case DEL:
  523.                   if(shm->cursor_x)
  524.                       shm->cursor_x--;
  525.                   break;
  526. ***************
  527. *** 1422,1428 ****
  528.               LOGPUTC(rchar,rcvr_log_fp);
  529.           }
  530.           /* back if log file if not raw and char is backspace */
  531. !         else if(!rcvr_log_raw && (rchar == BS))
  532.           {
  533.           long logpos = 0;
  534.               if(logpos = ftell(rcvr_log_fp))
  535. --- 1423,1429 ----
  536.               LOGPUTC(rchar,rcvr_log_fp);
  537.           }
  538.           /* back if log file if not raw and char is backspace */
  539. !         else if(!rcvr_log_raw && ((rchar == BS)||(rchar == DEL)))
  540.           {
  541.           long logpos = 0;
  542.               if(logpos = ftell(rcvr_log_fp))
  543. Index: ecusighdl.c
  544. *** dist/ecu/ecusighdl.c    Sun Jul 11 22:03:03 1993
  545. --- ecu3.24/ecusighdl.c    Mon Jul 12 11:20:03 1993
  546. ***************
  547. *** 358,363 ****
  548. --- 358,366 ----
  549.           restore_initial_colors();
  550.           kill(xmtr_pid,SIGHUP);
  551.       }
  552. + #ifdef linux
  553. +     tcap_restore_con();
  554. + #endif
  555.       exit(code);
  556.       /*NOTREACHED*/
  557.   
  558. ***************
  559. *** 504,510 ****
  560.   SIGTYPE
  561.   xmtr_SIGCLD_handler()
  562.   {
  563.   WAIT:
  564.       errno = 0;
  565.       if((last_child_wait_pid = wait(&last_child_wait_status)) < 0)
  566. --- 507,515 ----
  567.   SIGTYPE
  568.   xmtr_SIGCLD_handler()
  569.   {
  570. ! #if defined(FORK_DEBUG)
  571. !     char s40[40];
  572. ! #endif
  573.   WAIT:
  574.       errno = 0;
  575.       if((last_child_wait_pid = wait(&last_child_wait_status)) < 0)
  576. Index: ecutcap.c
  577. *** dist/ecu/ecutcap.c    Sun Jul 11 17:24:32 1993
  578. --- ecu3.24/ecutcap.c    Mon Jul 12 14:15:38 1993
  579. ***************
  580. *** 70,75 ****
  581. --- 70,76 ----
  582.   static char *tc_underscore_on = "";
  583.   static char *tc_underscore_off = "";
  584.   static char *tc_vbell = "";
  585. + static char *tc_lastline = "";
  586.   static char tc_strbuf[768];        /* absolutely blunderous overkill */
  587.   static int tc_standout_width;
  588.   
  589. ***************
  590. *** 100,105 ****
  591. --- 101,110 ----
  592.       {
  593.           tcap_LINES = tgetnum("li");
  594.           tcap_COLS = tgetnum("co");
  595. + #ifdef linux
  596. +         if((tcap_LINES == 25) && (strcmp(ttype,"console")==0))
  597. +             tcap_LINES = 24;
  598. + #endif
  599.           if(cptr = getenv("LINES"))            /* environment override ... */
  600.               tcap_LINES = atoi(cptr);        /* ... for termcap systems */
  601.           if(cptr = getenv("COLUMNS"))
  602. ***************
  603. *** 120,125 ****
  604. --- 125,131 ----
  605.           tc_insline          = tgetstr("al",&cptr);
  606.           tc_move             = tgetstr("cm",&cptr);
  607.           tc_vbell            = tgetstr("vb",&cptr);
  608. +         tc_lastline         = tgetstr("ll",&cptr);
  609.           tc_underscore_on    = tgetstr("us",&cptr);
  610.           tc_underscore_off   = tgetstr("ue",&cptr);
  611.           if(!tc_underscore_on || !tc_underscore_off)
  612. ***************
  613. *** 539,544 ****
  614. --- 545,568 ----
  615.       rcvrdisp_actual2();
  616.   
  617.   }    /* end of tcap_clear_area_char */
  618. + #ifdef linux
  619. + /*+-------------------------------------------------------------------------
  620. +    tcap_restore_con()
  621. +    Linux normally has a screen size of 25, this does not work with ecu's
  622. +    vt100 emulation, so the init sequence esc [1;24r must be in the funckeymap
  623. +    file.  However this needs to be changed back before we leave, or else the
  624. +    system doesn't work.  The lastline (ll) termcap entry includes this
  625. +    sequence, so we do not need to check terminal type.  Going to the last
  626. +    line will not hurt on other terminal types.
  627. + --------------------------------------------------------------------------*/
  628. + void
  629. + tcap_restore_con()
  630. + {
  631. +     if(*tc_lastline) 
  632. +         fputs(tc_lastline,stderr);
  633. + }    /* end of tcap_restore_con */
  634. + #endif /* Linux */
  635.   
  636.   /* end of ecutcap.c */
  637.   /* vi: set tabstop=4 shiftwidth=4: */
  638. Index: ecuungetty/Make.src
  639. *** dist/ecu/ecuungetty/Make.src    Sun Jul 11 17:21:05 1993
  640. --- ecu3.24/ecuungetty/Make.src    Mon Jul 12 14:51:36 1993
  641. ***************
  642. *** 60,65 ****
  643. --- 60,68 ----
  644.   clobber: clean
  645.       rm -f $(PROGRAM)
  646.   
  647. + distclean: clobber
  648. +     rm -f Makefile
  649.   ../bamboozle.o: ../bamboozle.c
  650.       cd ..;make bamboozle.o
  651.   
  652. ***************
  653. *** 78,97 ****
  654.   #regenerate .o:.h dependencies automatically
  655.   depend:
  656.       rm -f depend.tmp
  657. !     if test '$(SRC)' ;\
  658. !     then (grep '^#include' $(SRC) \
  659. !     | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  660. !         -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  661. !         -e 's?\(.*\)\.c?\1.o?'\
  662. !      >> depend.tmp) ;\
  663. !     fi
  664.   
  665.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  666.       echo '.+1,$$d' >>eddep.tmp
  667.       echo 'r depend.tmp' >> eddep.tmp
  668.       echo 'w' >> eddep.tmp
  669.       cp Makefile Makefile.new
  670. !     ed Makefile.new < eddep.tmp
  671.       rm eddep.tmp depend.tmp
  672.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  673.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  674. --- 81,95 ----
  675.   #regenerate .o:.h dependencies automatically
  676.   depend:
  677.       rm -f depend.tmp
  678. !     then $(CC) -M $(CFLAGS) $(SRC) >>depend.tmp
  679.   
  680.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  681.       echo '.+1,$$d' >>eddep.tmp
  682.       echo 'r depend.tmp' >> eddep.tmp
  683.       echo 'w' >> eddep.tmp
  684. +     echo 'q' >> eddep.tmp
  685.       cp Makefile Makefile.new
  686. !     ex Makefile.new < eddep.tmp || true
  687.       rm eddep.tmp depend.tmp
  688.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  689.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  690. Index: ecuwinutil.c
  691. *** dist/ecu/ecuwinutil.c    Sun Jul 11 17:25:12 1993
  692. --- ecu3.24/ecuwinutil.c    Mon Jul 12 14:16:04 1993
  693. ***************
  694. *** 48,53 ****
  695. --- 48,54 ----
  696.   #endif
  697.   
  698.   extern int tty_is_multiscreen;
  699. + extern int tcap_LINES;
  700.   
  701.   #ifdef M_SYSV
  702.   unsigned char sTL = at_TL;
  703. ***************
  704. *** 172,178 ****
  705.       endwin();
  706.   */
  707.       if(botleft_flag)
  708. !         tcap_cursor(LINES - 1,0);
  709.       ttymode(ttymode_before_window_start);
  710.       windows_active = 0;
  711.   }    /* end of windows_end */
  712. --- 173,179 ----
  713.       endwin();
  714.   */
  715.       if(botleft_flag)
  716. !         tcap_cursor(tcap_LINES - 1,0);
  717.       ttymode(ttymode_before_window_start);
  718.       windows_active = 0;
  719.   }    /* end of windows_end */
  720. ***************
  721. *** 326,331 ****
  722. --- 327,333 ----
  723.                       goto RETURN;
  724.   
  725.                   case BS:
  726. +                 case DEL:
  727.                       if(count)
  728.                       {
  729.                           if(count == pos)
  730. Index: expresp.c
  731. *** dist/ecu/expresp.c    Sun Jul 11 17:25:36 1993
  732. --- ecu3.24/expresp.c    Mon Jul 12 13:17:09 1993
  733. ***************
  734. *** 14,19 ****
  735. --- 14,20 ----
  736.    \r - carriage return
  737.    \c - no new-line
  738.    \n - send new-line
  739. +  \s - send space
  740.    \nnn - send octal number
  741.    \\ - send backslash
  742.    \m### - sleep ### (decimal) milliseconds (non-standard)
  743. ***************
  744. *** 49,55 ****
  745.   #define MAX_FIELDS    50    /* max fields in a chat script */
  746.   #define MAX_EXPRESP    511    /* max length of a chat script */
  747.   #define MAX_EXPECT    63    /* max length of expect string */
  748. ! #define DEFAULT_TIMEOUT_MSECS (10*1000L)
  749.   
  750.   #define ERDEBUG(verb,str,arg) if(expresp_verbosity >= verb) \
  751.       pprintf(str,arg)
  752. --- 50,56 ----
  753.   #define MAX_FIELDS    50    /* max fields in a chat script */
  754.   #define MAX_EXPRESP    511    /* max length of a chat script */
  755.   #define MAX_EXPECT    63    /* max length of expect string */
  756. ! #define DEFAULT_TIMEOUT_MSECS (45*1000L)
  757.   
  758.   #define ERDEBUG(verb,str,arg) if(expresp_verbosity >= verb) \
  759.       pprintf(str,arg)
  760. ***************
  761. *** 196,201 ****
  762. --- 197,206 ----
  763.                       break;
  764.                   case '~':
  765.                       *parsed++ = '~';
  766. +                     remaining--;
  767. +                     break;
  768. +                 case 's':
  769. +                     *parsed++ = ' ';
  770.                       remaining--;
  771.                       break;
  772.                   default:
  773. Index: gendial/Make.src
  774. *** dist/ecu/gendial/Make.src    Sun Jul 11 17:21:07 1993
  775. --- ecu3.24/gendial/Make.src    Mon Jul 12 14:51:40 1993
  776. ***************
  777. *** 90,112 ****
  778.   clobber: clean
  779.       rm -f dialg*
  780.   
  781.   #regenerate .o:.h dependencies automatically
  782.   depend:
  783.       rm -f depend.tmp
  784. !     if test '$(SRC)' ;\
  785. !     then (grep '^#include' $(SRC) \
  786. !     | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  787. !         -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  788. !         -e 's?\(.*\)\.c?\1.o?'\
  789. !      >> depend.tmp) ;\
  790. !     fi
  791.   
  792.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  793.       echo '.+1,$$d' >>eddep.tmp
  794.       echo 'r depend.tmp' >> eddep.tmp
  795.       echo 'w' >> eddep.tmp
  796.       cp Makefile Makefile.new
  797. !     ed Makefile.new < eddep.tmp
  798.       rm eddep.tmp depend.tmp
  799.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  800.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  801. --- 90,110 ----
  802.   clobber: clean
  803.       rm -f dialg*
  804.   
  805. + distclean: clobber
  806. +     rm -f Makefile
  807.   #regenerate .o:.h dependencies automatically
  808.   depend:
  809.       rm -f depend.tmp
  810. !     then $(CC) -M $(CFLAGS) $(SRC) >>depend.tmp
  811.   
  812.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  813.       echo '.+1,$$d' >>eddep.tmp
  814.       echo 'r depend.tmp' >> eddep.tmp
  815.       echo 'w' >> eddep.tmp
  816. +     echo 'q' >> eddep.tmp
  817.       cp Makefile Makefile.new
  818. !     ex Makefile.new < eddep.tmp || true
  819.       rm eddep.tmp depend.tmp
  820.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  821.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  822. Index: help/Make.src
  823. *** dist/ecu/help/Make.src    Sun Jul 11 17:21:10 1993
  824. --- ecu3.24/help/Make.src    Mon Jul 12 14:57:20 1993
  825. ***************
  826. *** 58,63 ****
  827. --- 58,66 ----
  828.   clobber: clean
  829.       rm -f $(PROGRAM) ecuhelp.data ecuhelp.doc
  830.   
  831. + distclean: clobber
  832. +     rm -f Makefile
  833.   #MSC -Zg is broken and even my kludge mechanism can't make this one
  834.   #anymore.  Decommitted until some future day.
  835.   #protos: $(PROGRAM).fls
  836. ***************
  837. *** 69,88 ****
  838.   #
  839.   depend:
  840.       rm -f depend.tmp
  841. !     if test '$(SRC)' ;\
  842. !     then (grep '^#include' $(SRC) \
  843. !     | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  844. !         -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  845. !         -e 's?\(.*\)\.c?\1.o?'\
  846. !      >> depend.tmp) ;\
  847. !     fi
  848.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  849.       echo '.+1,$$d' >>eddep.tmp
  850.       echo 'r depend.tmp' >> eddep.tmp
  851.       echo 'w' >> eddep.tmp
  852.       cp Makefile Makefile.new
  853. !     ed Makefile.new < eddep.tmp
  854.       rm eddep.tmp depend.tmp
  855.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  856.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  857. --- 72,85 ----
  858.   #
  859.   depend:
  860.       rm -f depend.tmp
  861. !     $(CC) -M $(CFLAGS) $(SRC) >> depend.tmp
  862.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  863.       echo '.+1,$$d' >>eddep.tmp
  864.       echo 'r depend.tmp' >> eddep.tmp
  865.       echo 'w' >> eddep.tmp
  866. +     echo 'q' >> eddep.tmp
  867.       cp Makefile Makefile.new
  868. !     ex Makefile.new < eddep.tmp || true
  869.       rm eddep.tmp depend.tmp
  870.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  871.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  872. Index: models/funckeymap
  873. *** dist/ecu/models/funckeymap    Sun Jul 11 22:02:56 1993
  874. --- ecu3.24/models/funckeymap    Sat Jul 10 15:37:37 1993
  875. ***************
  876. *** 536,538 ****
  877. --- 536,566 ----
  878.       CUL:CUL:        esc [ D
  879.       CUR:CUR:        esc [ C
  880.   
  881. + # Linux Console keyboard.  More or less vt100
  882. + console
  883. + con80x25
  884. +        IS:1:        esc [ 1 ; 2 4 r
  885. +     F1:F1:          esc [ [ A 
  886. +     F2:F2:          esc [ [ B 
  887. +     F3:F3:          esc [ [ C 
  888. +     F4:F4:          esc [ [ D 
  889. +     F5:F5:          esc [ [ E 
  890. +     F6:F6:          esc [ 1 7 ~
  891. +     F7:F7:          esc [ 1 8 ~
  892. +     F8:F8:          esc [ 1 9 ~
  893. +     F9:F9:          esc [ 2 0 ~
  894. +     F10:F10:        esc [ 2 1 ~
  895. +     F11:F11:        esc [ 2 3 ~
  896. + #   F12:F12:        esc [ 2 4 ~
  897. +     Home:Home:      esc [ 1 ~
  898. +     End:End:        esc [ 4 ~
  899. +     PgUp:PgUp:      esc [ 5 ~
  900. +     PgDn:PgDn:      esc [ 6 ~
  901. +     CUU:CUU:        esc [ A 
  902. +     CUL:CUL:        esc [ D 
  903. +     CU5:CU5:        esc [ G 
  904. +     CUR:CUR:        esc [ C 
  905. +     CUD:CUD:        esc [ B 
  906. +     Ins:Ins:        esc [ 2 ~
  907. +     BkTab:F12:      esc [ 2 4 ~
  908. Index: sea/Make.src
  909. *** dist/ecu/sea/Make.src    Sun Jul 11 17:21:12 1993
  910. --- ecu3.24/sea/Make.src    Mon Jul 12 15:03:21 1993
  911. ***************
  912. *** 65,70 ****
  913. --- 65,73 ----
  914.   clobber: clean
  915.       rm -f $(PROGRAM)
  916.   
  917. + distclean: clobber
  918. +     rm -f Makefile
  919.   $(PROGRAM).fls: Makefile
  920.       ls $(SRC) >$(PROGRAM).fls
  921.   
  922. ***************
  923. *** 75,94 ****
  924.   #regenerate .o:.h dependencies automatically
  925.   depend:
  926.       rm -f depend.tmp
  927. !     if test '$(SRC)' ;\
  928. !     then (grep '^#include' $(SRC) \
  929. !     | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  930. !         -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  931. !         -e 's?\(.*\)\.c?\1.o?'\
  932. !      >> depend.tmp) ;\
  933. !     fi
  934.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  935.       echo '.+1,$$d' >>eddep.tmp
  936.       echo 'r depend.tmp' >> eddep.tmp
  937.       echo 'w' >> eddep.tmp
  938.       cp Makefile Makefile.new
  939. !     ed Makefile.new < eddep.tmp
  940.       rm eddep.tmp depend.tmp
  941.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  942.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  943. --- 78,91 ----
  944.   #regenerate .o:.h dependencies automatically
  945.   depend:
  946.       rm -f depend.tmp
  947. !     $(CC) -M $(CFLAGS) $(SRC) >>depend.tmp
  948.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  949.       echo '.+1,$$d' >>eddep.tmp
  950.       echo 'r depend.tmp' >> eddep.tmp
  951.       echo 'w' >> eddep.tmp
  952. +     echo 'q' >> eddep.tmp
  953.       cp Makefile Makefile.new
  954. !     ex Makefile.new < eddep.tmp || true
  955.       rm eddep.tmp depend.tmp
  956.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  957.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  958. Index: z/Make.src
  959. *** dist/ecu/z/Make.src    Sun Jul 11 17:21:16 1993
  960. --- ecu3.24/z/Make.src    Mon Jul 12 14:59:15 1993
  961. ***************
  962. *** 89,94 ****
  963. --- 89,97 ----
  964.   clobber: clean
  965.       rm -f ecusz ecurz
  966.   
  967. + distclean: clobber
  968. +     rm -f Makefile
  969.   comsrc.fls: Makefile
  970.       ls $(COM_SRC) > comsrc.fls
  971.   
  972. ***************
  973. *** 107,126 ****
  974.   #
  975.   depend:
  976.       rm -f depend.tmp
  977. !     if test '$(COM_SRC)' ;\
  978. !     then (grep '^#include' $(COM_SRC) \
  979. !     | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  980. !         -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  981. !         -e 's?\(.*\)\.c?\1.o?'\
  982. !      >> depend.tmp) ;\
  983. !     fi
  984.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  985.       echo '.+1,$$d' >>eddep.tmp
  986.       echo 'r depend.tmp' >> eddep.tmp
  987.       echo 'w' >> eddep.tmp
  988.       cp Makefile Makefile.new
  989. !     ed Makefile.new < eddep.tmp
  990.       rm eddep.tmp depend.tmp
  991.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  992.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  993. --- 110,123 ----
  994.   #
  995.   depend:
  996.       rm -f depend.tmp
  997. !     $(CC) -M $(CFLAGS) $(COM_SRC) >>depend.tmp
  998.       echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  999.       echo '.+1,$$d' >>eddep.tmp
  1000.       echo 'r depend.tmp' >> eddep.tmp
  1001.       echo 'w' >> eddep.tmp
  1002. +     echo 'q' >> eddep.tmp
  1003.       cp Makefile Makefile.new
  1004. !     ex Makefile.new < eddep.tmp || true
  1005.       rm eddep.tmp depend.tmp
  1006.       echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  1007.       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  1008.